// 配置路由规则
// import Layout from '@/layout'
export default {
  path: '/salaries', // 路由跳转页面路径
  name: 'salarys',
  component: () => import('@/layout'), // 一级路由组件
  children: [{
    path: '', // 二级路由路径设置为空 可以同时显示 Layout组件和salaries组件
    name: 'salarys',
    component: () => import('@/views/salaries/index'), // 二级路由组件
    meta: { title: '工资', icon: 'money' } // 左侧导航会读取路由里的meta里面的title作为显示菜单名称
  },
  {
    path: 'setting',
    component: () => import('@/views/salaries/setting'),
    name: 'salarysSetting',
    hidden: true,
    meta: {
      title: '设置'
    }
  },
  {
    path: 'details/:yearMonth/:id',
    component: () => import('@/views/salaries/detail'),
    name: 'salarysDetails',
    hidden: true,
    meta: {
      title: '详情'
    }
  },
  {
    path: 'historicalArchiving',
    component: () => import('@/views/salaries/historical'),
    name: 'salarysHistorical',
    hidden: true,
    meta: {
      title: '历史归档'
    }
  },
  {
    path: 'monthStatement',
    component: () => import('@/views/salaries/month'),
    name: 'salarysMonthStatement',
    hidden: true,
    meta: {
      title: '月报表'
    }
  }]
}

// 当访问地址是 /salaries 的时候 layout组件会显示 此时 二级路由的默认组件  也会显示
